local uzi = Instance.new("Tool",owner.Backpack) uzi.Name = "tim" local handle = Instance.new("Part",uzi) handle.Name = "Handle" handle.Size = Vector3.new(1,1,1) local mesh = Instance.new("SpecialMesh",handle) mesh.MeshId = "rbxassetid://4711605382" --mesh.TextureId = "rbxassetid://4711605902" local s = .04 mesh.Scale = Vector3.new(s,s,s) uzi.Grip = CFrame.new(0,-.2,.2) local origscale = mesh.Scale local origgrip = uzi.Grip local shooting = false local shoot = Instance.new("Sound") shoot.SoundId = "rbxassetid://7664553325" shoot.Volume = .5 shoot.PlayOnRemove = true local explode = shoot:Clone() explode.SoundId = "rbxassetid://9064887432" local bullets = {} local currentpos = Vector3.new(0,math.huge,0) local remote = Instance.new("RemoteFunction",uzi) remote.OnServerInvoke = function(o,a,b,c) if o ~= owner then return end if a == "pos" then currentpos = b.Position end end NLS([[local rem = script.Parent local mouse = owner:GetMouse() local sending = true local mult = 1 mouse.KeyDown:Connect(function(k) k = k:lower() if k == "e" then sending = not sending elseif k == "r" then mult = mult * 1.2 elseif k == "f" then mult = mult / 1.2 end end) local a = 0 game:GetService'RunService'.Heartbeat:Connect(function() a = a + .1 if sending then rem:InvokeServer("pos",mouse.Hit) else rem:InvokeServer("pos",owner.Character.Head.CFrame*CFrame.new(0,5*mult+math.sin(a*5*mult)*2,0)*CFrame.Angles(0,a,0)*CFrame.new(0,0,6*mult)) end end)]],remote) uzi.Activated:Connect(function() local p = uzi.Parent shooting = true local s s = uzi.Deactivated:Connect(function() s:Disconnect() s = 1 end) repeat task.wait() shoot.PlaybackSpeed = math.random(9,12)/10 shoot.Parent = handle shoot:Remove() local bullet = Instance.new("SpawnLocation",script) bullet.Enabled = false bullet.Size = Vector3.new(.3,.3,.3) bullet.Shape = Enum.PartType.Ball bullet.Color = handle.Color game:GetService("Debris"):AddItem(bullet,10) bullet.CFrame = handle.CFrame bullet.Material = "Neon" local c = 100 local function numbers(a,b) return math.rad(math.random(a*1000,b*1000)/1000) end bullet.Velocity = ((handle.CFrame.UpVector)*50)+((handle.CFrame*CFrame.Angles(numbers(-90,90),numbers(-90,90),numbers(-90,90))).LookVector*50) local pos = Instance.new("BodyPosition",bullet) pos.MaxForce = Vector3.new(5,5,5)*3 pos.P = 30000 pos.Position = currentpos local trail = Instance.new("Trail",bullet) local att1,att2 = Instance.new("Attachment",bullet),Instance.new("Attachment",bullet) att1.Position = Vector3.new(0,bullet.Size.Y/2,0) att2.Position = Vector3.new(0,-bullet.Size.Y/2,0) trail.Attachment0 = att1 trail.Attachment1 = att2 trail.Lifetime = .3 trail.Transparency = NumberSequence.new(.5,1) trail.Color = ColorSequence.new(bullet.Color) local c local function explodefunc(a) if not a:IsDescendantOf(script) and not a:IsDescendantOf(p) then if not a.Anchored then a:BreakJoints() a.Anchored = true a.Parent = script a.CanCollide = false a.Color = bullet.Color a.Material = bullet.Material game:GetService("TweenService"):Create(a,TweenInfo.new(3,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{Size = Vector3.new(.1,.1,.1), CFrame = a.CFrame*CFrame.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))*CFrame.Angles(math.random(-100000,100000)/10000,math.random(-100000,100000)/10000,math.random(-100000,100000)/10000) }):Play() for _,v in pairs(a:GetChildren()) do if v:IsA("SpecialMesh") then game:GetService("TweenService"):Create(v,TweenInfo.new(3,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{ Scale = Vector3.new(0,0,0) }):Play() end end game:GetService('Debris'):AddItem(a,3) end c:Disconnect() pos:Destroy() bullet.Anchored = true bullet.CanCollide = false bullet.Velocity = Vector3.new(0,0,0) bullet.Transparency = .5 bullet.Size = Vector3.new(0,0,0) explode.Parent = bullet explode.PlaybackSpeed = math.random(6,17)/10 explode:Remove() local a = game:GetService("TweenService"):Create(bullet,TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{Size = Vector3.new(5,5,5),Transparency = 1}) a:Play() a.Completed:Connect(function() bullet:Destroy() end) return true end return false end local tab = {bullet,pos,explodefunc} table.insert(bullets,tab) c = bullet.Touched:Connect(function(a) if not a:IsDescendantOf(p) and explodefunc(a) then table.remove(bullets,table.find(bullets,tab)) end end) until s == 1 shooting = false end) game:GetService("RunService").Heartbeat:Connect(function() handle.BrickColor = BrickColor.Random() local function s(a) if a then return CFrame.Angles(s()*30,s()*30,s()*30) else return (math.random(1,2)-1)/500 end end mesh.Scale = origscale uzi.Grip = origgrip if shooting then uzi.Grip *= s(1) mesh.Scale += Vector3.new(s(),s(),s()) end for i,v in pairs(bullets) do if v[1] and v[2] and v[1].Parent and v[2].Parent then if v[2].Position ~= currentpos then v[2].Position = currentpos end if (v[1].Position-v[2].Position).Magnitude <= 10 then local pe = OverlapParams.new() pe.FilterDescendantsInstances = {script,uzi.Parent} pe.FilterType = Enum.RaycastFilterType.Blacklist local closest = nil local close = math.huge for _,v2 in pairs(workspace:GetPartBoundsInRadius(v[1].Position,5,pe)) do local f = (v2.Position-v[1].Position).Magnitude if f < close then closest = v2 close = f end end if closest then v[3](closest) end end else table.remove(bullets,i) end end end)